package com.tsunami.authority.enums.auth;

/**
 * @Classname UserStatus
 * @Description TODO 用户状态
 * @Date 2021-06-03 9:25
 * @Created by lx
 */
public enum UserStatus {
    OK("0","正常"),
    DISABLE("1", "停用"),
    DELETED("2", "删除");
    private final String code;
    private final String info;

    UserStatus(String code, String info)
    {
        this.code = code;
        this.info = info;
    }
    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static UserStatus getEnum(String code) {
        for (final UserStatus item : UserStatus.values()) {
            if (item.code.equals(code)) {
                return item;
            }
        }
        return null;
    }
}
